home *** CD-ROM | disk | FTP | other *** search
- /**/
-
- signal on halt
- signal on break_c
-
- call Init()
- call CreateApp()
- call HandleApp()
- /* never reached */
- /***********************************************************************/
- Init: procedure expose global.
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
- if AddLibrary("rxmui.library")~=0 then exit
- call RxMUIOpt("DebugMode ShowErr")
- if ~ReadArgs("FILE") then do
- call PrintFault()
- exit
- end
- if parm.0.flag then global.file=parm.0.value
- else global.file=""
- return
- /***********************************************************************/
- CreateApp: procedure expose global.
-
- app.Title="TransferAnim"
- app.Version="$VER: TransferAnim 1.0 (12.10.2000)"
- app.Copyright="©2000, alfie"
- app.Author="alfie"
- app.Description="TransferAnim Example"
- app.Base="RXMUIEXAMPLE"
- app.SubWindow="win"
- win.ID="MAIN"
- win.Title="TransferAnim"
- win.Contents="mgroup"
-
- mgroup.0="gg"
- gg.class="group"
- gg.horiz=1
- gg.0=hspace()
- gg.1="ta"
- ta.class="TransferAnim"
- if global.file="" then ta.TABoingBall=1
- else ta.TAfile=global.file
- ta.Frame="ReadList"
- gg.2=hspace()
-
- mgroup.1=MakeObj(,"HBar")
-
- mgroup.2="sg"
- sg.class="group"
- sg.columns=2
- sg.0=Label("Frame")
- sg.1="sl"
- sl.class="slider"
-
- mgroup.3="cg"
- cg.class="group"
- cg.PageMode=1
- cg.0=button("stop","_Stop")
- cg.1=button("start","_Start")
-
- res=NewObj("APPLICATION","APP")
- if res~=0 then exit
-
- call Notify("win","CloseRequest",1,"app","ReturnID","quit")
-
- call Notify("ta","pressed",0,"app","return","say 'ta pressed'")
- call Notify("ta","taerror","everytime","app","return","say Error")
- call Notify("ta","taframe","everytime","sl","set","value","triggervalue")
-
- call Notify("sl","value","everytime","ta","set","taframe","triggervalue")
-
- call Notify("start","pressed",0,"ta","start")
- call Notify("stop","pressed",0,"ta","stop")
- call Notify("start","pressed",0,"cg","set","ActivePage",0)
- call Notify("stop","pressed",0,"cg","set","ActivePage",1)
-
- call set("win","open",1)
- call getattr("win","open","o")
- if o=0 then do
- say "can't open window"
- exit
- end
-
- call getattr("ta","taframes","a")
- call set("sl","max",a)
-
- return
- /***********************************************************************/
- HandleApp: procedure expose global.
- ctrl_c=2**12
- do forever
- call NewHandle("app","h",ctrl_c)
- if and(h.signals,ctrl_c)>0 then exit
- select
- when h.event="QUIT" then exit
- otherwise interpret h.event
- end
- end
- /* never reached */
- /***********************************************************************/
- halt:
- break_c:
- exit
- /**************************************************************************/
-